using EfSample.Model.Ef.Mappings.Strategies;

namespace EfSample.Model.Ef.Mappings
{
    public class RaceMapping : EntityMappingBase<Race>
    {
        public RaceMapping(IMappingStrategy<string> tableNameMappingStrategy) : base(tableNameMappingStrategy)
        {
            Property(entity => entity.Id).HasColumnName(ColumnNameMappingStrategy.Value.To("Id"));
            Property(entity => entity.Name).HasColumnName(ColumnNameMappingStrategy.Value.To("Name")).IsRequired().HasMaxLength(50);
        }
    }
}